<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>p_margin</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : April 1993</div>
    <p>
      <b>p_margin</b> -  phase margin</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>[phm,fr]=p_margin(h)  </tt>
      </dd>
      <dd>
        <tt>phm=p_margin(h)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>h</b>
        </tt>: SISO linear system (<tt>
          <b>syslin</b>
        </tt> list).</li>
      <li>
        <tt>
          <b>phm</b>
        </tt>: phase margin (in degree)</li>
      <li>
        <tt>
          <b>fr</b>
        </tt>: corresponding frequency (hz)</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
    The phase margin is the values of the phase at points where the
    nyquist plot of <tt>
        <b>h</b>
      </tt> crosses the unit circle.</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

h=syslin('c',-1+%s,3+2*%s+%s^2)
[p,fr]=p_margin(h)  
[p,fr]=p_margin(h+0.7)  
nyquist(h+0.7)
t=(0:0.1:2*%pi)';plot2d(sin(t),cos(t),-3,'000')
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="../graphics/chart.htm">
        <tt>
          <b>chart</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="../graphics/black.htm">
        <tt>
          <b>black</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="g_margin.htm">
        <tt>
          <b>g_margin</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="../graphics/nyquist.htm">
        <tt>
          <b>nyquist</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>S. S.  </p>
  </body>
</html>
